.tcp-monitor {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-top: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  height: auto;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  width: 100%;
}

.monitor-header {
  padding: 8px 12px;
  background-color: #f8f9fa;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.monitor-header h2 {
  margin: 0;
  font-size: 14px;
  color: #333;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-indicator.connected {
  background-color: #4caf50;
  box-shadow: 0 0 3px rgba(76, 175, 80, 0.5);
}

.status-indicator.disconnected {
  background-color: #f44336;
  box-shadow: 0 0 3px rgba(244, 67, 54, 0.5);
}

.client-count {
  margin-left: 8px;
  font-size: 11px;
  background-color: #e0f2f1;
  color: #00796b;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: normal;
}

.toggle-icon {
  color: #3366FF;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.expanded .toggle-icon {
  transform: rotate(180deg);
}

.monitor-content {
  padding: 10px;
  flex: 1;
  overflow: auto;
  max-height: 200px;
  background-color: #ffffff;
}

.monitor-toolbar {
  margin-bottom: 10px;
  display: flex;
  justify-content: flex-end;
}

.clear-button {
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-button:hover {
  background-color: #e0e0e0;
}

.monitor-panels {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px;
}

.clients-panel, .logs-panel {
  background-color: #f9f9f9;
  border-radius: 4px;
  padding: 8px;
  border: 1px solid #eee;
}

.clients-panel h3, .logs-panel h3 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #555;
  font-weight: 500;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.clients-list {
  max-height: 120px;
  overflow-y: auto;
}

.client-item {
  background-color: #fff;
  border-radius: 3px;
  padding: 6px;
  margin-bottom: 5px;
  border-left: 2px solid #3f51b5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.client-address {
  font-weight: 600;
  font-size: 12px;
  color: #333;
  margin-bottom: 3px;
}

.client-username, .client-time, .client-activity {
  font-size: 11px;
  color: #666;
  margin-bottom: 2px;
}

.logs-container {
  height: 120px;
  overflow-y: auto;
  background-color: #fff;
  border-radius: 3px;
  padding: 6px;
  font-family: monospace;
  font-size: 11px;
  border: 1px solid #eee;
}

.log-item {
  padding: 2px 0;
  border-bottom: 1px solid #f5f5f5;
  line-height: 1.3;
}

.log-time {
  color: #888;
  margin-right: 6px;
}

.log-message {
  color: #333;
}

.log-item.system {
  color: #9e9e9e;
}

.log-item.connect {
  color: #2196f3;
}

.log-item.disconnect {
  color: #ff9800;
}

.log-item.data {
  color: #4caf50;
}

.log-item.error {
  color: #f44336;
}

.no-clients, .no-logs {
  color: #9e9e9e;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .monitor-panels {
    grid-template-columns: 1fr;
  }
  
  .clients-list, .logs-container {
    max-height: 120px;
  }
} 